import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
import { AppDispatch, RootState } from "./store";

// useAppDispatch 本质还是  useDispatch ，只不过加上 类型约束
export const useAppDispatch: () => AppDispatch = useDispatch;
// useAppSelector 本质还是 useSelector ，只不过 加上 类型约束
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
